﻿/******************************
 * 数据访问层
 * 借款人信息
 * Author：JXL
 ******************************/ 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using IDAL;
using Model;

namespace DAL
{
   public class Loan_infoDAL:BaseDAL,ILoan_Info
    {

        protected override string tablename
        {
            get { return "Loan_Info"; }
        }

        protected override Dictionary<string, bool> pkname
        {
            get
            {
                var id = new Dictionary<string, bool>();
                {
                    id.Add("loan_Id", true);
                }
                return id;
            }
        }
       /// <summary>
       /// 数据添加
       /// </summary>
       /// <param name="list"></param>
       /// <returns></returns>
        public int insert(List<Loan_Info> list)
        {
            string str = "";
            foreach (var item in list)
            {
                str += HouseCommon.Common.sqltostring<Loan_Info>(item, tablename, pkname) + ";";
            }
            str = str.Substring(0, str.Length - 1);
            return DBhelper.NonQuery(str);

        }
    }
}
